# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-cheetah3
_pkgname=Cheetah3
pkgver=3.2.6.post2
pkgrel=6
pkgdesc='A template engine and code generation tool.'
arch=('x86_64' 'aarch64')
url='https://pypi.org/project/cheetah3/#files'
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/Cheetah3-$pkgver.tar.gz")
sha512sums=('94b45c4e48e507b9eca254d097fff7175b2d75597cfda05a7a8f373917d333a5bc2e48ff7eebe5f8f711b0ed2531adbe2bfee3c271c093026c3ece2627734e1b')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  for i in "$pkgdir/usr/bin/"*; do
    mv $i "${i}3"
  done
}

